package com.sasis.webapp.dwr;

import com.sasis.model.FlightAdjustInstruction;
import com.sasis.model.User;
import com.sasis.service.FlightAdjustInstructionManager;
import com.sasis.util.CopyUtil;
import com.sasis.util.DateUtil;
import com.sasis.webapp.form.FlightAdjustInstructionForm;

public class FlightAdjustInstructionRemote {
  private FlightAdjustInstructionManager flightAdjustInstructionManager;

public void setFlightAdjustInstructionManager(
		FlightAdjustInstructionManager flightAdjustInstructionManager) {
	this.flightAdjustInstructionManager = flightAdjustInstructionManager;
}
  public boolean save(FlightAdjustInstructionForm flightAdjustInstructionForm){
	   java.util.Calendar c = java.util.Calendar.getInstance();
       String sysDate = DateUtil.parseToString(c.getTime(),
               DateUtil.yyyyMMddHHmmss);
       flightAdjustInstructionForm.setOperatime(sysDate);
     //  User user=getLoginUser();
     //  flightAdjustInstructionForm.setOperator(String.valueOf(user.getId()));
	  FlightAdjustInstruction flightAdjustInstruction=new FlightAdjustInstruction();
	  CopyUtil.copy(flightAdjustInstructionForm, flightAdjustInstruction);
	  flightAdjustInstructionManager.saveFlightAdjustInstruction(flightAdjustInstruction);
	 
	  return true;
 }
}
